package com.zmx.patients.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;


import com.zmx.patients.R;
import com.zmx.patients.adapter.base.BaseAdapter;
import com.zmx.patients.adapter.base.BaseHolder;
import com.zmx.patients.adapter.base.MomentHolder;
import com.zmx.patients.listener.OnItemPictureClickListener;
import com.zmx.patients.pojo.FriendsMessage;

import java.util.List;

public class FriendsItemAdapter extends BaseAdapter<FriendsMessage> {

    private List<FriendsMessage> list;
    private Context context;
    private final int ITEM_TEXT=0;
    private final int ITEM_EMPTY=1;
    private OnItemPictureClickListener listener;
    public FriendsItemAdapter(Context context, List<FriendsMessage> list, OnItemPictureClickListener listener) {
        super(context, list);
        this.list = list;
        this.context = context;
        this.listener = listener;
    }

    @Override
    public int getHolderType(int position) {
        return ITEM_TEXT;
    }

    @Override
    public BaseHolder createBaseHolder(ViewGroup parent, int viewType) {
        BaseHolder holder = null;
        switch (viewType){
            case ITEM_TEXT:
                holder = new MomentHolder(context,LayoutInflater.from(context).inflate(R.layout.adapter_friends_item,parent,false),listener);
                break;
        }
        return holder;
    }


}